function [ result ] = jacobian_x( xSet, uSet, pars)
% JACOBIAN_X returns the derivative of the plant dynamics with respect to
% the state vector (known as Jacobian)
% INPUTS:
%   xSet  : state values where to do linearization (Taylor expansion)
%   uSet  : input values where to do linearization (Taylor expansion)
%   pars: parameters of the plant model
%
% OUTPUT:
%  result: Jacobian matrix

% Initialization of working variables
Dx = xSet(1);
Dy = xSet(2);
p = xSet(3);
Dp = xSet(4);

% Initialization of car's geometrics
m = pars.m; % 1000?
I = pars.I; % 300?
g = pars.g; % 9.81?
a = pars.a; % 1?
b = pars.b; % 1?

% Tire models by Pacejca

% Lateral / front
a1_c = -22.1;
a2_c = 1011;
a3_c = 1078;
a4_c = 1.82;
a5_c = 0.208;
a6_c = 0.000;
a7_c = -0.354;
a8_c = 0.707;
a9_c = 0.028;
C_c_f = 1.3;

% Lateral / rear
C_c_r = 1.3;

% Longitudinal / front
a1_l = 21.3;
a2_l = 1144;
a3_l = 49.6;
a4_l = 226;
a5_l = 0.069;
a6_l = -0.006;
a7_l = 0.056;
a8_l = 0.486;
C_l_f = 1.65;

% Longitudinal / rear
C_l_r = 1.65;

% Calculate the jacobian for given state and input
result = zeros(8,8);
result(1,:) = [ 0, 1, 0, 0, 0, 0, 0, 0];
result(2,:) = [ 0, (2*C_l_r*exp(-(a*a5_l*g*m)/(2*a + 2*b))*cosd(C_l_r*atand((exp(-(a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2))))*(((Dy - Dp*b)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx^2*((Dy - Dp*b)^2/Dx^2 + 1)) - ((Dy - Dp*b)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2))/(Dx^2*((Dy - Dp*b)^2/Dx^2 + 1)*(atand((Dy - Dp*b)/Dx)^2*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*m*((exp(-(2*a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_c_r^2*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)) - ((2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*sind(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) - (2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*cosd(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m, 0, Dp + ((2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*sind(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) - (2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*cosd(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m - (2*C_l_r*exp(-(a*a5_l*g*m)/(2*a + 2*b))*cosd(C_l_r*atand((exp(-(a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2))))*((a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1)/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)*(atand((Dy - Dp*b)/Dx)^2*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*m*((exp(-(2*a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_c_r^2*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, Dy + ((2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*sind(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) - (2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*cosd(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m + (2*C_l_r*exp(-(a*a5_l*g*m)/(2*a + 2*b))*cosd(C_l_r*atand((exp(-(a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2))))*((b*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (b*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2))/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)*(atand((Dy - Dp*b)/Dx)^2*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2))/(C_c_r*m*((exp(-(2*a*a5_l*g*m)/(2*a + 2*b))*(atand(atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dy - Dp*b)/Dx)*(a8_l + (a*a7_l*g*m)/(2*a + 2*b) + (a^2*a6_l*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a*a4_l*g*m)/(2*a + 2*b) + (a^2*a3_l*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_c_r^2*((a*a2_l*g*m)/(2*a + 2*b) + (a^2*a1_l*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, 0];
result(3,:) = [ 0, 0, 0, 1, 0, 0, 0, 0];
result(4,:) = [ 0, ((2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m - Dp + (2*a3_c*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(((Dy - Dp*b)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx^2*((Dy - Dp*b)^2/Dx^2 + 1)) - ((Dy - Dp*b)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(Dx^2*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(m*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, - ((2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m - (2*a3_c*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*((a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1)/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2)/(Dx*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(m*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, (2*a3_c*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*((b*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (b*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(Dx*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(m*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)) - ((2*a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (2*exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))/m - Dx, 0, 0];
result(5,:) = [ 0, 0, 0, 0, 0, 1, 0, 0];
result(6,:) = [ 0, (2*a*((exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*(((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((sind(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) - (cosd(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)))/I - (2*a3_c*b*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(((Dy - Dp*b)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx^2*((Dy - Dp*b)^2/Dx^2 + 1)) - ((Dy - Dp*b)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(Dx^2*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(I*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, (2*a3_c*b*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*((a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1)/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2)/(Dx*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(I*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)) - (2*a*((exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*(((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - ((cosd(uSet)/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)))/I, 0, - (2*a*((a3_c*cosd(C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b))))))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*cosd(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1))))/((a3_c^2*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))^2*((atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_f*atand((a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))) - a9_c*uSet))/(C_c_f*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)))*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a7_c*b*g*m)/(2*a + 2*b) + (a6_c*b^2*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a5_c*b*g*m)/(2*a + 2*b)))))^2)/(C_c_f^2*((a2_c*b*g*m)/(2*a + 2*b) + (a1_c*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1) + (exp(-(a5_l*b*g*m)/(2*a + 2*b))*cosd(C_l_f*atand((exp(-(a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(C_l_f*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2))))*sind(uSet)*((((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))/((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1) - (((a*cosd(uSet))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)) + (a*sind(uSet)*(Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a)))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2)*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/(((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))^2/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a))^2 + 1)*(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))^2*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2 + 1)))*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2))/((exp(-(2*a5_l*b*g*m)/(2*a + 2*b))*(atand(atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2)) - atand((Dx*sind(uSet) - cosd(uSet)*(Dy + Dp*a))/(Dx*cosd(uSet) + sind(uSet)*(Dy + Dp*a)))*(a8_l + (a7_l*b*g*m)/(2*a + 2*b) + (a6_l*b^2*g^2*m^2)/(2*a + 2*b)^2 - 1))^2*((a4_l*b*g*m)/(2*a + 2*b) + (a3_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2)/(C_l_f^2*((a2_l*b*g*m)/(2*a + 2*b) + (a1_l*b^2*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)))/I - (2*a3_c*b*cosd(C_c_r*atand((a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2))))*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))*((b*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1))/(Dx*((Dy - Dp*b)^2/Dx^2 + 1)) - (b*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(Dx*((a3_c^2*atand((Dy - Dp*b)/Dx)^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)*((Dy - Dp*b)^2/Dx^2 + 1))))/(I*((a3_c^2*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))^2*(atand((Dy - Dp*b)/Dx)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2 - 1) - (C_c_r*atand((a3_c*atand((Dy - Dp*b)/Dx)*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b))))/(C_c_r*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)))*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)*(a8_c + (a*a7_c*g*m)/(2*a + 2*b) + (a^2*a6_c*g^2*m^2)/(2*a + 2*b)^2))/(a3_c*sind(a4_c*atand((a*a5_c*g*m)/(2*a + 2*b)))))^2)/(C_c_r^2*((a*a2_c*g*m)/(2*a + 2*b) + (a^2*a1_c*g^2*m^2)/(2*a + 2*b)^2)^2) + 1)), 0, 0];
result(7,:) = [ 0, cos(p), 0, -sin(p), - Dy*cos(p) - Dx*sin(p), 0, 0, 0];
result(8,:) = [ 0, sin(p), 0, sin(p), Dx*cos(p) + Dy*cos(p), 0, 0, 0];
end

